package com.njwb.day12.zhujie;

import java.lang.reflect.Method;

public class Main {
    public static void main(String[] args) throws Exception {
        Method method = Test.class.getMethod("sayHello");
        if (method.isAnnotationPresent(MyAnnotation.class)) {
            MyAnnotation anno = method.getAnnotation(MyAnnotation.class);
            System.out.println("value: " + anno.value());
            System.out.println("count: " + anno.count());
            System.out.println("name:"+anno.name());

        }
    }
}
